package com.probiz.estore.customer.dao;

import java.util.List;

import com.probiz.estore.common.model.customer.Address;
import com.probiz.estore.core.dao.GenericDao;

/**
 * Address Data Access Object (DAO) interface. Developer introduced interfaces should be declared here. Won't get overwritten.
 */
public interface AddressDao extends GenericDao<Address> {
	/**
	 * 获得客户所有地址
	 * @param appuserId
	 * @return
	 */
	public List<Address> getAllByAppuserId(Integer appuserId);
	/**
	 * 获取默认的运输地址
	 * 
	 * @param appuserId
	 * @return
	 */
	public Address getDefShippingAddr(Integer appuserId);
	/**
	 * 获得客户所有送货地址
	 * @param appuserId
	 * @return
	 */
	public List<Address> getAllShippingAddressByAppuserId(Integer appuserId);
	
	/**
	 * 获得客户此地址外的其他地址
	 * @param appuserId
	 * @param addressId
	 * @return
	 */
	public List<Address> getAppuserOtherAddress(Integer appuserId, Integer addressId);

	/**
	 * 获得客户收货人地址的个数
	 * 
	 * @param customerId
	 * @return
	 */
	public Long countAddressOfCustomer(Integer customerId);
}
